<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<link rel="Start" href="index.html">
<link rel="next" href="XmlRpcBase64.html">
<link rel="Up" href="index.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of class attributes" rel=Appendix href="index_attributes.html">
<link title="Index of class methods" rel=Appendix href="index_methods.html">
<link title="Index of classes" rel=Appendix href="index_classes.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="XmlRpc" rel="Chapter" href="XmlRpc.html">
<link title="XmlRpcBase64" rel="Chapter" href="XmlRpcBase64.html"><link title="High-level interface" rel="Section" href="#6_Highlevelinterface">
<link title="Utility functions" rel="Section" href="#6_Utilityfunctions">
<link title="Low-level interface" rel="Section" href="#6_Lowlevelinterface">
<title>XmlRpc</title>
</head>
<body>
<div class="navbar">&nbsp;<a href="index.html">Up</a>
&nbsp;<a href="XmlRpcBase64.html">Next</a>
</div>
<center><h1>Module <a href="type_XmlRpc.html">XmlRpc</a></h1></center>
<br>
<pre><span class="keyword">module</span> XmlRpc: <code class="code">sig</code> <a href="XmlRpc.html">..</a> <code class="code">end</code></pre>XmlRpc Light
<p>

    XmlRpc Light is a minimal XmlRpc client based on Xml Light and Ocamlnet.
<p>

    It provides a type for values, a client class with a simple calling
    interface, and low-level tools that can be used to implement a server.
<p>

    <i>(c) 2007 Dave Benjamin</i><br>
<hr width="100%">
<br>
<a name="6_Highlevelinterface"></a>
<h6>High-level interface</h6><br>
<br>
Example: <pre><code class="code">    let rpc = new XmlRpc.client "http://localhost:8000" in
    let result = rpc#call "echo" [`String "hello!"] in
    print_endline (XmlRpc.dump result) </code></pre><br>
<pre><span class="keyword">exception</span> <a name="EXCEPTIONError"></a>Error <span class="keyword">of</span> <code class="type">(int * string)</code></pre>
<div class="info">
Raised for all errors including XmlRpc faults (code, string).<br>
</div>
<pre><span class="keyword">type</span> <a name="TYPEvalue"></a><code class="type"></code>value = <code class="type">[ `Array of <a href="XmlRpc.html#TYPEvalue">value</a> list<br>       | `Binary of string<br>       | `Boolean of bool<br>       | `DateTime of int * int * int * int * int * int * int<br>       | `Double of float<br>       | `Int of int<br>       | `String of string<br>       | `Struct of (string * <a href="XmlRpc.html#TYPEvalue">value</a>) list ]</code> </pre>
<div class="info">
Polymorphic variant type for XmlRpc values:<ul>
<li><code class="code">`Array</code>: An ordered list of values</li>
<li><code class="code">`Binary</code>: A string containing binary data</li>
<li><code class="code">`Boolean</code>: A boolean</li>
<li><code class="code">`DateTime</code>: A date-time value
      (year, month, day, hour, minute, second, timezone offset in minutes)</li>
<li><code class="code">`Double</code>: A floating-point value</li>
<li><code class="code">`Int</code>: An integer</li>
<li><code class="code">`String</code>: A string</li>
<li><code class="code">`Struct</code>: An association list of (name, value) pairs</li>
</ul>

    Note that base64-encoding of <code class="code">`Binary</code> values is done automatically.
    You do not need to do the encoding yourself.<br>
</div>

<pre><span class="keyword">class</span> <a name="TYPEclient"></a><a href="XmlRpc.client.html">client</a> : <code class="type">string -> </code><code class="code">object</code> <a href="XmlRpc.client.html">..</a> <code class="code">end</code></pre><div class="info">
Class for XmlRpc clients.
</div>
<br>
<a name="6_Utilityfunctions"></a>
<h6>Utility functions</h6><br>
<pre><span class="keyword">val</span> <a name="VALdump"></a>dump : <code class="type"><a href="XmlRpc.html#TYPEvalue">value</a> -> string</code></pre><div class="info">
Converts an XmlRpc value to a human-readable string for debugging.<br>
</div>
<br>
<a name="6_Lowlevelinterface"></a>
<h6>Low-level interface</h6><br>
<br><code><span class="keyword">type</span> <a name="TYPEmessage"></a><code class="type"></code>message = </code><table class="typetable">
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span class="constructor">MethodCall</span> <span class="keyword">of</span> <code class="type">(string * <a href="XmlRpc.html#TYPEvalue">value</a> list)</code></code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span class="constructor">MethodResponse</span> <span class="keyword">of</span> <code class="type"><a href="XmlRpc.html#TYPEvalue">value</a></code></code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span class="constructor">Fault</span> <span class="keyword">of</span> <code class="type">(int * string)</code></code></td>

</tr></table>

<div class="info">
Type for XmlRpc messages.<br>
</div>

<pre><span class="keyword">val</span> <a name="VALmessage_of_xml_element"></a>message_of_xml_element : <code class="type">?base64_decode:(string -> string) -><br>       ?datetime_decode:(string -> int * int * int * int * int * int * int) -><br>       Xml.xml -> <a href="XmlRpc.html#TYPEmessage">message</a></code></pre><div class="info">
Converts an Xml Light element to an XmlRpc message.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALxml_element_of_message"></a>xml_element_of_message : <code class="type">?base64_encode:(string -> string) -><br>       ?datetime_encode:(int * int * int * int * int * int * int -> string) -><br>       <a href="XmlRpc.html#TYPEmessage">message</a> -> Xml.xml</code></pre><div class="info">
Converts an XmlRpc message to an Xml Light element.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALvalue_of_xml_element"></a>value_of_xml_element : <code class="type">?base64_decode:(string -> string) -><br>       ?datetime_decode:(string -> int * int * int * int * int * int * int) -><br>       Xml.xml -> <a href="XmlRpc.html#TYPEvalue">value</a></code></pre><div class="info">
Converts an Xml Light element to an XmlRpc value.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALxml_element_of_value"></a>xml_element_of_value : <code class="type">?base64_encode:(string -> string) -><br>       ?datetime_encode:(int * int * int * int * int * int * int -> string) -><br>       <a href="XmlRpc.html#TYPEvalue">value</a> -> Xml.xml</code></pre><div class="info">
Converts an XmlRpc value to an Xml Light element.<br>
</div>
</body></html>